﻿<Window x:Class="NicoView.View.NicoViewBroadcastSplashScreenWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
        xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
        xmlns:Behaviors ="clr-namespace:NicoView.View.Behaviors"
        Title="NicoViewBroadcastSplashScreenWindow" Height="300" Width="300" WindowStyle="None" DataContext="{Binding NicoViewBroadcastConsolViewModel, Mode=OneWay, Source={StaticResource locator}}" >


    <i:Interaction.Triggers>
        <Behaviors:BroadcastStartedMessageTrigger>
            <ei:CallMethodAction MethodName="Close"/>
        </Behaviors:BroadcastStartedMessageTrigger>


        <Behaviors:BroadcastStartFailedMessageTrigger>
            <ei:CallMethodAction MethodName="Close"/>

        </Behaviors:BroadcastStartFailedMessageTrigger>

    </i:Interaction.Triggers>

    <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
        <Grid.RowDefinitions>

            <RowDefinition Height="Auto"/>
            <RowDefinition Height="50"/>
            <RowDefinition Height="Auto"/>

        </Grid.RowDefinitions>


        <TextBlock x:Name="NotificationMessageBlock" Grid.Row="1" Text="{Binding BroadcastStarting, Mode=OneWay, Source={StaticResource resources}}"   >
            <i:Interaction.Triggers>


                <Behaviors:BroadcastStartingMessageTrigger>
                    <Behaviors:BroadcastNotificationAction/>
                    
                </Behaviors:BroadcastStartingMessageTrigger>
                
                <Behaviors:BroadcastQueueingMessageTrigger>
                    <Behaviors:BroadcastNotificationAction/>
                </Behaviors:BroadcastQueueingMessageTrigger>
                
            </i:Interaction.Triggers>

        </TextBlock>

        <Button Grid.Row="3"  Content="{Binding Cancel, Mode=OneWay, Source={StaticResource resources}}">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="Click">
                    <i:InvokeCommandAction Command="{Binding CancelBroadcastCommand}"/>
                    
                </i:EventTrigger>

            </i:Interaction.Triggers>

        </Button>

    </Grid>
</Window>
